<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"
	trimDirectiveWhitespaces="true"%>
<%@page import="java.util.Date"%>
<%@ include file="../../admin.inc.jsp"%>
<script>
function callback(success, msg) {
	if (success) {
		alertMsg.info(msg);
		navTab.closeCurrentTab();		
		navTab.reload("", {
			lastTabId : ""
		});
	}else{
		alertMsg.warn(msg);
	}
}

</script>
<div class="pageContent">
	<form method="post" id="form_solution_list" action="${webContextPath}/admin/solution/list" onsubmit="return navTabSearch(this)">
	<input type="hidden" name="pageNum" id="pageNum" value="${pageInfo.pageNum}" />
	<input type="hidden" name="numPerPage" id="numPerPage" value="${pageInfo.numPerPage}"/>
	<input type="hidden" name="solutionId" id="solutionId" value="${solutionId}"/>
	
	</form>
</div>
<div class="pageContent j-resizeGrid">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${webContextPath}/admin/solution/toAdd?solutionId=${solutionId}" target="navTab" mask="true"
               width="450" height="450" title="添加" ref="solutionAdd">
               <span>添加</span>
            </a></li>
        </ul>
	</div>
	<div class="grid" layouth="65" style="width: 1149px; overflow: auto;">
	<table class="table" width="100%">
		<thead>
			<tr>
				<th width="40">ID</th>
				<th width="70">模特ID</th>
				<th width="70">模特名称</th>
				<th width="50">工作开始时间</th>
				<th width="50">工作结束时间</th>
				<th width="50">总工作小时数</th>
				<th width="50">单价</th>
				<th width="60">操作</th>
			</tr>
		</thead>
		<tbody style="text-align:center">
			<c:forEach var="item" items="${list}" varStatus="status">
				<tr target="solutionId" rel="${item.id}" style="">
					<td>${item.id}</td>
					<td>${item.modelId}</td>
					<td>${item.modelName}</td>
					<td>
						<c:if test="${item.workStartTime!=null}">
							<fmt:formatDate value='${item.workStartTime}' pattern="yyyy-MM-dd HH:mm:ss" />
						</c:if>
					</td>
					<td>
						<c:if test="${item.workEndTime!=null}">
							<fmt:formatDate value='${item.workEndTime}' pattern="yyyy-MM-dd HH:mm:ss" />
						</c:if>
					</td>
					<td>${item.workHours}</td>
					<td>${item.unitAmount}</td>
					<td>
					<a title="编辑" target="navTab" href="${webContextPath}/admin/solution/toEdit?id=${item.id}"
						 mask="true" class="btnEdit" width="430" height="500" ref="solutionEdit">编辑</a>
					<a title="删除" target="ajaxTodo" href="${webContextPath}/admin/solution/deleteSingleModel?id=${item.id}" class="btnDel">删除</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	</div>
	<div class="panelBar" style="bottom:0px">
		<div class="pages">			
			<span>共${size}条</span>
		</div>
		<div class="pagination" targettype="navTab" totalcount="${size}" 
		numperpage="${pageInfo.numPerPage}" pagenumshown="10" currentpage="${pageInfo.pageNum}">
		</div>
	</div>
</div>